package cn.foolishbird.crow.enumeration;

import cn.foolishbird.crow.core.CrowEnum;
import cn.foolishbird.crow.enumeration.annotation.DefDictionary;
import cn.foolishbird.crow.enumeration.annotation.Dictionary;

/**
 * @author foolish-bird
 */
@Dictionary(value = "Failure", name = "成功/失败")
public enum FailureEnum implements CrowEnum {

    @DefDictionary
    SUCCESS(1, "成功"),
    FAILURE(2, "失败");

    /**
     * 状态
     */
    private final Integer status;

    /**
     * 状态说明
     */
    private final String desc;

    FailureEnum(Integer state, String desc) {
        this.status = state;
        this.desc = desc;
    }

    @Override
    public Integer value() {
        return this.status;
    }

    @Override
    public String content() {
        return this.desc;
    }

}
